<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
    xmlns:primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Data"
    >

    <!--<ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Brushes.xaml"/>
        <ResourceDictionary Source="Fonts.xaml"/>
    </ResourceDictionary.MergedDictionaries>-->

    <Style TargetType="Expander" x:Key="DefaultExpanderStyle">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Expander">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Name="ContentRow" Height="0"/>
                        </Grid.RowDefinitions>
                        <Border Name="Border" Grid.Row="0" BorderThickness="0" CornerRadius="2,2,0,0" 
                                Background="{StaticResource LightBrush}" BorderBrush="Transparent" >
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="20" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Grid Grid.Row="0" Height="20" Width="20">
                                    <ToggleButton IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" 
                                                  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                                                  OverridesDefaultStyle="True" Template="{StaticResource ExpanderToggleButton}" 
                                                  BorderBrush="Transparent" BorderThickness="0" />
                                    <Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                                        <Ellipse Name="Ellipse1" StrokeThickness="1" Stroke="Blue" Width="20" Height="20" 
                                                 HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                    </Canvas>
                                </Grid>
                                <!--<Grid Grid.Row="0" Height="20">
                                            <ToggleButton IsChecked="{Binding Path=IsExpanded,Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" 
                                                          Height="20" Width="20" HorizontalAlignment="Center" VerticalAlignment="Center" 
                                                          OverridesDefaultStyle="True" Template="{StaticResource ExpanderToggleButton}" 
                                                          Background="{StaticResource NormalBrush}" BorderBrush="Transparent" BorderThickness="0" />
                                            <Canvas HorizontalAlignment="Left" VerticalAlignment="Top">
                                                <Ellipse Name="Ellipse1" StrokeThickness="1" Stroke="Blue" Width="20" Height="20" Canvas.Left="1" Canvas.Top="1" />
                                            </Canvas>
                                        </Grid>-->
                                <!--<ContentPresenter Grid.Column="1" Margin="4" ContentSource="Header" RecognizesAccessKey="True" />-->
                            </Grid>
                        </Border>
                        <!--<Border Name="Content" Grid.Row="1" BorderThickness="1,0,1,1" CornerRadius="0,0,2,2" 
                                        Background="Beige" BorderBrush="Black" >
                                    <ContentPresenter Margin="4" />
                                </Border>-->
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsExpanded" Value="True">
                            <Setter TargetName="ContentRow" Property="Height" Value="{Binding ElementName=Content,Path=DesiredHeight}" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- IMPLICIT STYLES -->
    <Style TargetType="Expander" BasedOn="{StaticResource DefaultExpanderStyle}" />

</ResourceDictionary>
